home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / vidhrdw / meteor.c < prev    next >
C/C++ Source or Header  |  1999-07-05  |  1KB  |  52 lines

  1. /***************************************************************************
  2.  
  3.   vidhrdw.c
  4.  
  5.   Functions to emulate the video hardware of the machine.
  6.  
  7. ***************************************************************************/
  8.  
  9. #include "driver.h"
  10. #include "vidhrdw/generic.h"
  11.  
  12.  
  13. unsigned char *meteor_scrollram;
  14.  
  15.  
  16. /***************************************************************************
  17.  
  18.   Draw the game screen in the given osd_bitmap.
  19.   Do NOT call osd_update_display() from this function, it will be called by
  20.   the main emulation engine.
  21.  
  22. ***************************************************************************/
  23. void meteor_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh)
  24. {
  25.     int offs;
  26.  
  27.  
  28.     /* draw the characters as sprites because they could be overlapping */
  29.  
  30.     fillbitmap(bitmap,Machine->pens[0],&Machine->drv->visible_area);
  31.  
  32.  
  33.     for (offs = 0; offs < videoram_size; offs++)
  34.     {
  35.         int code,sx,sy,col;
  36.  
  37.  
  38.         sy = 8 * (offs / 32) -  (meteor_scrollram[offs]       & 0x0f);
  39.         sx = 8 * (offs % 32) + ((meteor_scrollram[offs] >> 4) & 0x0f);
  40.  
  41.         code = videoram[offs] + ((colorram[offs] & 0x01) << 8);
  42.         col  = (~colorram[offs] >> 4) & 0x07;
  43.  
  44.         drawgfx(bitmap,Machine->gfx[0],
  45.                 code,
  46.                 col,
  47.                 0,0,
  48.                 sx,sy,
  49.                 &Machine->drv->visible_area,TRANSPARENCY_PEN,0);
  50.     }
  51. }
  52.